
package com.egene.tw.activity.wiki;

import com.egene.tw.R;

public enum WikiTab {
    ADULT(0,R.string.frame_title_adult_medicine, AdultMedicineFragment_.class),
    CHILD(1, R.string.frame_title_child_health, ChildHealthFragment_.class),
    BEAUTY(2, R.string.frame_title_beauty, BeautyFragment_.class);

    private Class<?> clz;
    private int idx;
    private int title;

    private WikiTab(int idx, int title, Class<?> clz) {
        this.idx = idx;
        this.clz = clz;
        this.setTitle(title);
    }

    public static WikiTab getTabByIdx(int idx) {
        for (WikiTab t : values()) {
            if (t.getIdx() == idx)
                return t;
        }
        return ADULT;
    }

    public Class<?> getClz() {
        return clz;
    }

    public void setClz(Class<?> clz) {
        this.clz = clz;
    }

    public int getIdx() {
        return idx;
    }

    public void setIdx(int idx) {
        this.idx = idx;
    }

    public int getTitle() {
        return title;
    }

    public void setTitle(int title) {
        this.title = title;
    }

}
